﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics;

namespace Jet.Dal.EF.Tests.DataObjects
{
	/// <summary>
	/// Information about customer from Northwind database
	/// </summary>
	[DebuggerDisplay("{CustomerID} - {CompanyName}")]
	[Table("Customers")]
	public class Customer
	{
		[Key]
		public string CustomerID { get; set; }

		[Column]
		public string CompanyName { get; set; }

		[Column]
		public string ContactName { get; set; }

		[Column]
		public string ContactTitle { get; set; }

		[Column]
		public string Address { get; set; }

		[Column]
		public string City { get; set; }

		[Column]
		public string Region { get; set; }

		[Column]
		public string PostalCode { get; set; }

		[Column]
		public string Country { get; set; }

		[Column]
		public string Phone { get; set; }

		[Column]
		public string Fax { get; set; }

		public virtual ICollection<Order> Orders { get; set; }

		/// <summary>
		/// Overriding ToString() to display current information
		/// </summary>
		/// <returns></returns>
		public override string ToString()
		{
			return String.Format("Customer '{0}'; Company'{1}'",CustomerID, CompanyName);
		}

	}
}
